Repository navigation
Avoid fetching dependencies from TestPyPI - #2191
Merged
Merged
Conversation
Use `--no-deps` and require a wheel to avoid downloading runtime or build dependencies from TestPyPI. Replace mixed-index installation advice with separate dependency installation from PyPI, and explain the risk of unintended or malicious packages. The packaging tutorial already uses `--no-deps` and has similar guidance. Closes pypagh-1500
henryiii
approved these changes
Nov 16, 2026
merwok
reviewed
Nov 20, 2026
| The ``--index-url`` flag selects TestPyPI instead of PyPI. The ``--no-deps`` | ||
| flag prevents installing runtime dependencies, while ``--only-binary=:all:`` | ||
| requires a wheel, avoiding installation of build dependencies. If your package | ||
| has dependencies, install them separately from PyPI before running these commands. |
Contributor
There was a problem hiding this comment.
Is there an existing doc about this to link to, or can an example of pip install --only-deps be added here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
--no-depsand require a wheel to avoid downloading runtime or build dependencies from TestPyPI. Replace mixed-index installation advice with separate dependency installation from PyPI, and explain the risk of unintended or malicious packages.The packaging tutorial already uses
--no-depsand has similar guidance.Closes gh-1500
📚 Documentation preview 📚: https://python-packaging-user-guide--2191.org.readthedocs.build/en/2191/